package entity

import (
	"time"
	"wms/pb"
)

// StockApplyTimeline [...]
type StockApplyTimeline struct {
	StockApplyTimelineID int64             `gorm:"primaryKey;column:stock_apply_timeline_id;type:bigint;not null"`
	AuditStatus          pb.AuditStatus    `gorm:"column:audit_status;type:tinyint unsigned"` // 1待审核;2通过;3拒绝
	StockInNo            string            `gorm:"column:stock_in_no;type:varchar(128)"`
	StockOutNo           string            `gorm:"column:stock_out_no;type:varchar(128)"`
	StockApplyType       pb.StockApplyType `gorm:"column:stock_apply_type;type:tinyint"` // 1入库2出库
	PassRemark           string            `gorm:"column:pass_remark;type:varchar(100)"`
	DenyRemark           string            `gorm:"column:deny_remark;type:varchar(100)"`
	CreatedAt            time.Time         `gorm:"column:created_at;type:datetime"`
	UpdatedAt            time.Time         `gorm:"column:updated_at;type:datetime"`
}

// TableName get sql table name.获取数据库表名
func (m *StockApplyTimeline) TableName() string {
	return "stock_apply_timeline"
}
